package com.biao.threads_test;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
public class Test05_Async {

    @Autowired
    private Test05_Service test05Service;

    @RequestMapping("/aaa")
    public String test() {
        System.out.println("<1>");
        test05Service.asyncLog();     // 注意执行顺序
        // 子线程执行结束才会继续往下执行
        System.out.println("<3>");
        return "result";
    }

}
